﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CoilIntelStorage.Models
{
    /// <summary>
    /// 任务队列表
    /// </summary>
    public class TaskQueue : INotifyPropertyChanged
    {
        /// <summary>
        /// 序号列
        /// </summary>
        private Int32 orderNo;
        /// <summary>
        /// 主键
        /// </summary>
        private Int32 id;
        /// <summary>
        /// 任务类型 1：入库，2：出库，3：挪库
        /// </summary>
        private Int32 type;
        /// <summary>
        /// 任务类型 1：入库，2：出库，3：挪库
        /// </summary>
        private String typeStr;
        /// <summary>
        /// 起点 记录库位编号
        /// </summary>
        private String start_point;
        /// <summary>
        /// 终点 记录库位编号
        /// </summary>
        private String end_point;
        /// <summary>
        /// 队列创建时间
        /// </summary>
        private DateTime build_time;
        /// <summary>
        /// 队列开始执行时间
        /// </summary>
        private DateTime start_time;
        /// <summary>
        /// 队列结束执行时间
        /// </summary>
        private DateTime end_time;
        /// <summary>
        /// 队列状态 1:等待；2：执行；3：完成；
        /// </summary>
        private Int32 status;
        /// <summary>
        /// 队列执行的货物编号
        /// </summary>
        private String goods_code;

        public int Id { get => id; set => id = value; }
        public int Type { get => type; set => type = value; }
        public string Start_point { get => start_point; set => start_point = value; }
        public string End_point { get => end_point; set => end_point = value; }
        public DateTime Build_time { get => build_time; set => build_time = value; }
        public DateTime Start_time { get => start_time; set => start_time = value; }
        public DateTime End_time { get => end_time; set => end_time = value; }
        public int Status { get => status; set => status = value; }
        public string Goods_code { get => goods_code; set => goods_code = value; }
        public string TypeStr { get => typeStr; set => typeStr = value; }
        public int OrderNo { get => orderNo; set => orderNo = value; }

        public event PropertyChangedEventHandler PropertyChanged;
        private void OnPropertyChanged(string name)
        {
            if (this.PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(name));
            }
        }
    }
}
